<template>
  <view>
    <u-subsection @change="handleSubsectionChange" :list="list"
                  :current="index"></u-subsection>
  </view>
</template>

<script setup lang="ts">

import {ref} from "vue";

// const props = defineProps({
//   value: {
//     type: String,
//     default: '0'
//   },
// })
const emits =defineEmits(['change'])
const list = ref(['全部', '已过期', '快过期', '正常'])
const index = ref(0)
const handleSubsectionChange = (e: number) => {
  index.value = e
  emits('change', list.value[e])
}
</script>

<style scoped>

</style>